//
//  YHYSaveButtonCollectionViewCell.m
//  Home
//
//  Created by 杨泓晔 on 16/6/20.
//  Copyright © 2016年 LanJue. All rights reserved.
//

#import "YHYSaveButtonCollectionViewCell.h"

@interface YHYSaveButtonCollectionViewCell ()
@property (nonatomic, strong)UIButton *button;
@end

@implementation YHYSaveButtonCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.contentView.backgroundColor = LV;
        self.button = [UIButton buttonWithType:UIButtonTypeCustom];
        self.button.backgroundColor = GH;
        self.button.layer.masksToBounds = YES;
        self.button.layer.cornerRadius = 5;
        self.button.tag=1001;
        [self.contentView addSubview:self.button];
        [self.button setTitle:@"保存" forState:UIControlStateNormal];
        [self.button addTarget:self action:@selector(goNext:) forControlEvents:UIControlEventTouchUpInside];
        [self.button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        // [self.button setTitleColor:HS forState:UIControlStateNormal];
        //    self.button.frame = CGRectMake(50.00*AUTO_WIDTH, 600.00*AUTO_WIDTH, 275.00*AUTO_WIDTH, 40.00*AUTO_WIDTH);
        [self.button mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(0 * AUTO_HEIGHT);
            make.left.mas_equalTo(7 * AUTO_WIDTH);
            make.right.mas_equalTo(-7 * AUTO_WIDTH);
            make.height.mas_equalTo(40 * AUTO_HEIGHT);
            
        }];
        self.button.titleLabel.font = [UIFont fontWithName:@"Arial" size:TEXTCONTENTFONT * TEXTWEIGHT];
        

    }
    return self;
}
-(void)goNext:(UIButton *) seave{

    [self.Delegate seavePost];

}
@end
